'''
Created on 2011-6-6

@author: elm
'''
import string
def parseUri(uri):
    args = uri.split(":")
    if len(args)==1:
        return args[0],10000
    else:
        return args[0],string.atoi(args[1])

def parseConn(uri):
    if uri.find("://")<0:
        uri = "http://"+uri
    return uri